package com.testpro.DesignPattern.TemplateMethodPattern;

public abstract class abstractDrivingLicense {

    //模板方法 不允许 子类进行修改 获取驾照的流程
    final public void getDrivingLicense() {

        this.signup();//报名
        this.physicalexamination();//体检
        this.Pay();//缴费
        this.Study();//学习
        this.Examination();//考试
        if (this.isOK()) {
            this.getLicense();//获得驾照
        } else {
            System.out.println("您的考试不合格 不符合获取驾照的要求");
        }
    }

    protected abstract boolean isOK();

    protected abstract void getLicense();

    protected abstract void Examination();

    protected abstract void Study();

    protected abstract void Pay();

    protected abstract void physicalexamination();

    protected abstract void signup();

}
